<script setup lang="ts">
import useLanguage from '@/hooks/language'
import useUserStore from '@/stores/user'
import ExampleFeatureVue from './ExampleFeature.vue'

const appStore = useUserStore()

const { language, updateLanguage } = useLanguage()

const { t, availableLocales } = useI18n()
console.log(t('hello'))
</script>
<template>
  <el-button @click="appStore.updateToken('tokenqw12asdgdagf89461346')">
    刷新token {{ appStore.token }}
  </el-button>
  <el-radio-group
    :model-value="language"
    @change="(lang:any) => updateLanguage(lang)"
  >
    <el-radio-button
      v-for="lang in availableLocales"
      :key="lang"
      :label="lang"
    />
  </el-radio-group>

  {{ language }}
  <span v-t="'hello'"></span>
  <p>{{ t('example.$1') }}</p>
  <p>{{ t('example.some') }}</p>
  <p>{{ t('hello') }}</p>
  <p>{{ t("i'm god") }}</p>

  <el-calendar />
  <ExampleFeatureVue />
</template>
<style scoped lang="scss">
/* sass,scss rules */
</style>
